<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/pages/common/header.jsp"%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<title>Create User</title>
		<script type="text/javascript">
		
			function checkFields(){
				var userName=document.getElementById("userName").value;
				var new_pwd=document.getElementById("new_pwd").value;
				var repeated_pwd=document.getElementById("repeated_pwd").value;
				if(userName==null || userName==""){
					alert("Please Enter User Name");
					return false;
				}else if(new_pwd==null || new_pwd==""){
					alert("Please Enter New Password");
					return false;
				}
				else if(repeated_pwd==null || repeated_pwd==""){
					alert("Please Enter Repeated Password");
					return false;
				}else if(new_pwd!=repeated_pwd){
					alert("Your New Password is not matched to repeated password");
					return false;
				}
				return true;
			}
		</script>
	</head>
	<body class="mainbody">
		<div class="mainContainer">
			<form id="userForm" method="post" action="${context}/createUser">
				<input type="hidden" name="ACTION" value="AU">
			
				<section class="bodyContainer">
					<div class="productReport">
			        	<h2 class="titleTxtBig">User Form</h2>
			            <!-- <p class="backButtonDiv"><a href="">Back</a></p> -->
			            <p class="hrlineBr"></p>
			         		
			        	<div class="productSfcField">
			        		<div class="divclear">   
								<div class="forgotPassTxt">User Name :</div>
								<div class="forgotPassTxt">
									<input type="text" id="userName" name="FN" placeholder="User Name" value="" >
								</div>
							</div>	
							
				           	<p class="spacerTopTen"></p>
				            <div class="divclear">   
								<div class="forgotPassTxt">Roles Type</div>
								<div class="forgotPassTxt">
									<select name="UR" class="loginSelectfld" id="displayRole">
										<option>Change Role</option>
										<option value="Administrator" >Administrator</option>
										<option value="Account">Account</option>
										<option value="Purchase">Purchase</option>
										<option value="Dispatch">Dispatch</option>
									</select>
								</div>
							</div>
							<div class="divclear">   
								<div class="forgotPassTxt">Password</div>
								<div class="forgotPassTxt">
									<input type="password" id="new_pwd" name="NPWD" placeholder="Password" value="" >
								</div>
							</div>	
							<div class="divclear">   
								<div class="forgotPassTxt">Re-Enter New Password</div>
								<div class="forgotPassTxt">
									<input type="password"  id="repeated_pwd" name="RPWD" placeholder="Re-Enter New Password" value="" >
								</div>
							</div>	
									
							<p class="spacerTopTen"></p> <p class="spacerTopTen"></p> <p class="spacerTopTen"></p>
			                <div class="divclear">
			                    <span class="loginlabel"></span>
			                    <span class="buttonSiyora button80"><a onclick="return checkFields();" href=""><input
								type="submit" value="Save" /></a></span>
			                    <span class="buttonSiyora button80"><a href="${context}/pages/jsp/newUser.jsp"> cancel</a></span>
			                </div>
		            	 	<p class="spacerTopTen"></p> <p class="spacerTopTen"></p> <p class="spacerTopTen"></p>
		            
		          		</div>           	           
		       		</div>
				</section>
  			</form>	
  		</div>
		<!--main container-->
		<jsp:include page="/pages/common/footer.jsp" />
	</body>
</html>